<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { ElMessage } from 'element-plus';
import 'element-plus/dist/index.css';
import {userStore} from "@/store/index.js";
const router = useRouter();

</script>

<template>
  <div>
    <!-- 添加router属性 -->
    <el-menu router>
      <el-sub-menu index="1">
        <template #title>
          <el-icon><Refresh /></el-icon>
          <span>账户信息</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/myCenter/"><el-icon><User /></el-icon>个人信息</el-menu-item>
          <el-menu-item index="/myCenter/address"><el-icon><MapLocation /></el-icon>收货地址</el-menu-item>
        </el-menu-item-group>
      </el-sub-menu>
    </el-menu>
  </div>
</template>

<style scoped>
.menu {
  height: 88vh;
}
h2 {
  background-color: #82b5f6;
  color: white;
  margin: 0;
  padding: 10px;
}
</style>